<!doctype html>
<html lang="zh-CN">
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <meta name="referrer" content="no-referrer-when-downgrade">
    

    <title>《Dart异步编程之Stream》 | 早起的年轻人</title>
    <meta property="og:title" content="《Dart异步编程之Stream》 - 早起的年轻人">
    <meta property="og:type" content="article">
        
    <meta property="article:published_time" content='2021-07-31T18:38:57&#43;08:00'>
        
        
    <meta property="article:modified_time" content='2021-07-31T18:38:57&#43;08:00'>
        
    <meta name="Keywords" content="Flutter，golang,go语言,go语言笔记,飞雪无情,java,android,博客,项目管理,python,软件架构,公众号,小程序">
    <meta name="description" content="《Dart异步编程之Stream》">
        
    <meta name="author" content="luckly">
    <meta property="og:url" content="https://luckly.work/post/flutter/Dart%E5%BC%82%E6%AD%A5%E7%BC%96%E7%A8%8B%E4%B9%8BStream/">
    <link rel="shortcut icon" href='/favicon.ico'  type="image/x-icon">

    <link rel="stylesheet" href='/css/normalize.css'>
    <link rel="stylesheet" href='/css/style.css'>
    <script type="text/javascript" src="//cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

    
    
    
        <link href="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" rel="stylesheet">
    
    
    
    
        <link rel="stylesheet" href='/css/douban.css'>
    
        <link rel="stylesheet" href='/css/other.css'>
    
</head>

<link rel="stylesheet"
      href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/highlight.min.js"></script>
<body>
    <header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="https://luckly.work/">
                        早起的年轻人
                    </a>
                
                <p class="description">专注于Flutter、Android、Java、Go语言(golang)、移动互联网、项目管理、软件架构</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="current" href="https://luckly.work/">首页</a>
                    
                    <a  href="https://luckly.work/categories/" title="分类">分类</a>
                    
                    <a  href="https://luckly.work/tags/" title="标签">标签</a>
                    
                    <a  href="https://luckly.work/about/" title="关于我">关于我</a>
                    
                    <a  href="https://github.com/ITmxs/" title="github">github</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>

    <div id="body">
        <div class="container">
            <div class="col-group">

                <div class="col-8" id="main">
                    
<div class="res-cons">
    <style type="text/css">
    .post-toc {
        position: fixed;
        width: 200px;
        margin-left: -210px;
        padding: 5px 10px;
        font-family: Athelas, STHeiti, Microsoft Yahei, serif;
        font-size: 12px;
        border: 1px solid rgba(0, 0, 0, .07);
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.98);
        background-clip: padding-box;
        -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        word-wrap: break-word;
        white-space: nowrap;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        z-index: 999;
        cursor: pointer;
        max-height: 70%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .post-toc .post-toc-title {
        width: 100%;
        margin: 0 auto;
        font-size: 20px;
        font-weight: 400;
        text-transform: uppercase;
        text-align: center;
    }

    .post-toc .post-toc-content {
        font-size: 15px;
    }

    .post-toc .post-toc-content>nav>ul {
        margin: 10px 0;
    }

    .post-toc .post-toc-content ul {
        padding-left: 20px;
        list-style: square;
        margin: 0.5em;
        line-height: 1.8em;
    }

    .post-toc .post-toc-content ul ul {
        padding-left: 15px;
        display: none;
    }

    @media print,
    screen and (max-width:1057px) {
        .post-toc {
            display: none;
        }
    }
</style>
<div class="post-toc" style="position: absolute; top: 188px;">
    <h2 class="post-toc-title">文章目录</h2>
    <div class="post-toc-content">
        <nav id="TableOfContents">
  <ul>
    <li><a href="#single-subscription-streams">Single subscription streams</a></li>
    <li><a href="#broadcast-streams">Broadcast streams</a></li>
  </ul>

  <ul>
    <li><a href="#transform-function">transform() function</a></li>
    <li><a href="#reading-and-decoding-a-file">Reading and decoding a file</a></li>
  </ul>
</nav>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        var postToc = $(".post-toc");
        if (postToc.length) {
            var leftPos = $("#main").offset().left;
            if(leftPos<220){
                postToc.css({"width":leftPos-10,"margin-left":(0-leftPos)})
            }

            var t = postToc.offset().top - 20,
                a = {
                    start: {
                        position: "absolute",
                        top: t
                    },
                    process: {
                        position: "fixed",
                        top: 20
                    },
                };
            $(window).scroll(function () {
                var e = $(window).scrollTop();
                e < t ? postToc.css(a.start) : postToc.css(a.process)
            })
        }
    })
</script>
    <article class="post">
        <header>
            <h1 class="post-title">《Dart异步编程之Stream》</h1>
        </header>
        <date class="post-meta meta-date">
            2021年7月31日
        </date>
        
        <div class="post-meta">
            <span>|</span>
            
            <span class="meta-category"><a href='/categories/flutter'>flutter</a></span>
            
            <span class="meta-category"><a href='/categories/dart'>dart</a></span>
            
        </div>
        
        
        <div class="post-meta">
            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span>
                    阅读</span></span>
        </div>
        
        
        <div class="clear" style="display: none">
            <div class="toc-article">
                <div class="toc-title">文章目录</div>
            </div>
        </div>
        
        <div class="post-content">
            <blockquote>
<p>本文主要翻译 Dart Stream 文档，了解 Stream 的用法。</p>
</blockquote>
<p>原文见<a href="https://dart.dev/tutorials/language/streams">这里</a>。</p>
<p>重点：</p>
<ul>
<li>Steams 提供异步的数据序列</li>
<li>数据序列可以用户生成的数据或者从文件读取的数据</li>
<li>可以使用 <strong>await for</strong> 或 Stream API 的 <code>listen()</code> 方法来处理 stream</li>
<li>Streams 提供错误处理机制</li>
<li>Streams 分为两类：单一的 subscription (single subscription) 或广播 (broadcast)</li>
</ul>
<p>Future 和 Stream 类用于 Dart 异步编程。</p>
<p>Future 表示不能立即结束的计算。普通函数返回计算结果，而异步函数返回 Future，它包含最终的计算结果。Future 会在计算完成时告知结果。</p>
<p>Stream 是异步事件序列。它有点像一个异步的 Iterable，不同之处在于，你不是自己获取下一个事件，而是由 Stream 在下一个事件准备好后通知你。</p>
<h1 id="接收-stream-事件">接收 stream 事件</h1>
<p>可以通过多种方式创建 streams，这个话题后面文章再讨论。无论哪种方式创建 stream，它们的用法都相同：用于 stream 事件上进行异步 for 循环迭代 (即 <strong>await for</strong>)，就像 Iterable 中进行普通 <strong>for 循环</strong> 迭代一样。比如，</p>
<pre><code>Future&lt;int&gt; sumStream(Stream&lt;int&gt; stream) async {
  var sum = 0;
  await for (var value in stream) {
    sum += value;
  }
  return sum;
}
</code></pre><p>这段代码只是接收整数事件 stream 的每个事件，然后返回它们的和 (一个 Future)。循环体结束后，函数暂停并等待下一个事件到来，直到 stream 结束。</p>
<p>使用 <strong>await for</strong> 循环时要求函数带 <code>async</code> 关键字。</p>
<h1 id="错误事件">错误事件</h1>
<p>Streams 在没有更多事件时结束。使用 <strong>await for</strong> 循环读取事件时，循环在 stream 结束时停止。</p>
<p>某些情况下，stream 结束前出现错误，比如，从远程服务器获取文件时网络断开，或者创建事件的代码有 bug。</p>
<p>Streams 以发送数据事件的相同方式发送错误事件。大多数 streams 会在第一次错误时中止，但也有些 streams 可能多次发送错误事件，还有些 streams 在错误事件后继续发送数据事件。这个文档中我们只讨论最多发送一次错误事件的情况。</p>
<p>使用 <strong>await for</strong> 读取 stream 时，循环语句抛出错误同时结束循环。可以使用 <strong>try-catch</strong> 来捕获错误。</p>
<h1 id="使用-stream">使用 stream</h1>
<p><code>Stream</code> 类有许多工具方法用于在 stream 上执行常用操作，跟 <code>Iterable</code> 的方法类似。比如，可以使用 Stream API 的 <code>lastWhere()</code> 方法查找 stream 中最后一个正整数：</p>
<pre><code>Future&lt;int&gt; lastPositive(Stream&lt;int&gt; stream) =&gt;
    stream.lastWhere((x) =&gt; x &gt;= 0);
</code></pre><h1 id="两种-stream">两种 Stream</h1>
<p>有两种 stream。</p>
<h2 id="single-subscription-streams">Single subscription streams</h2>
<p>最常用的 stream 包含整个事件中的一个小序列。事件必须以正确的顺序分发。读取文件或接收网络响应时得到的正是这种 stream。</p>
<h2 id="broadcast-streams">Broadcast streams</h2>
<p>另一种 stream 专门用于每次只能处理一条消息的场景。比如，用于浏览器中的鼠标事件。</p>
<p>可以在任何时候监听这个 stream，监听后会收到发送出来的事件。同一时刻可以监听多个 listener，取消前一个订阅后还能再次监听。</p>
<h1 id="处理-stream">处理 stream</h1>
<p><code>Stream&lt;T&gt;</code> 上的以下方法用于处理 stream 并且返回结果：</p>
<pre><code>Future&lt;T&gt; get first;
Future&lt;bool&gt; get isEmpty;
Future&lt;T&gt; get last;
Future&lt;int&gt; get length;
Future&lt;T&gt; get single;
Future&lt;bool&gt; any(bool Function(T element) test);
Future&lt;bool&gt; contains(Object needle);
Future&lt;E&gt; drain&lt;E&gt;([E futureValue]);
Future&lt;T&gt; elementAt(int index);
Future&lt;bool&gt; every(bool Function(T element) test);
Future&lt;T&gt; firstWhere(bool Function(T element) test, {T Function() orElse});
Future&lt;S&gt; fold&lt;S&gt;(S initialValue, S Function(S previous, T element) combine);
Future forEach(void Function(T element) action);
Future&lt;String&gt; join([String separator = &quot;&quot;]);
Future&lt;T&gt; lastWhere(bool Function(T element) test, {T Function() orElse});
Future pipe(StreamConsumer&lt;T&gt; streamConsumer);
Future&lt;T&gt; reduce(T Function(T previous, T element) combine);
Future&lt;T&gt; singleWhere(bool Function(T element) test, {T Function() orElse});
Future&lt;List&lt;T&gt;&gt; toList();
Future&lt;Set&lt;T&gt;&gt; toSet();
</code></pre><p>除了 <code>drain()</code> 和 <code>pipe()</code>，其他方法都能在 Iterable 中找到相应的方法。这些方法很容易写，在 async 方法使用 <strong>await for</strong> 循环。比如，以下是一些方法的实现：</p>
<pre><code>Future&lt;bool&gt; contains(Object needle) async {
  await for (var event in this) {
    if (event == needle) return true;
  }
  return false;
}

Future forEach(void Function(T element) action) async {
  await for (var event in this) {
    action(event);
  }
}

Future&lt;List&lt;T&gt;&gt; toList() async {
  final result = &lt;T&gt;[];
  await this.forEach(result.add);
  return result;
}

Future&lt;String&gt; join([String separator = &quot;&quot;]) async =&gt;
    (await this.toList()).join(separator);
</code></pre><p>(注意，以上只是精简后的代码，由于历史原因实际实现可能更复杂。)</p>
<h1 id="修改-stream">修改 stream</h1>
<p>Stream 类的以下方法基于原先的 stream 返回一个新的 stream。Each one waits until someone listens on the new stream before listening on the original.</p>
<pre><code>Stream&lt;R&gt; cast&lt;R&gt;();
Stream&lt;S&gt; expand&lt;S&gt;(Iterable&lt;S&gt; Function(T element) convert);
Stream&lt;S&gt; map&lt;S&gt;(S Function(T event) convert);
Stream&lt;R&gt; retype&lt;R&gt;();
Stream&lt;T&gt; skip(int count);
Stream&lt;T&gt; skipWhile(bool Function(T element) test);
Stream&lt;T&gt; take(int count);
Stream&lt;T&gt; takeWhile(bool Function(T element) test);
Stream&lt;T&gt; where(bool Function(T event) test);
</code></pre><p>相应地，Iterable 中也有类似的方法用于将一个 iterable 转换成另外一个 iterable。这些方法很容易使用带 <strong>await for</strong> 循环的 async 方法编写。</p>
<pre><code>Stream&lt;E&gt; asyncExpand&lt;E&gt;(Stream&lt;E&gt; Function(T event) convert);
Stream&lt;E&gt; asyncMap&lt;E&gt;(FutureOr&lt;E&gt; Function(T event) convert);
Stream&lt;T&gt; distinct([bool Function(T previous, T next) equals]);
</code></pre><p><code>asyncExpand()</code> 和 <code>asyncMap()</code> 函数跟 <code>expand()</code> 和 <code>map()</code> 类似，但允许其函数参数为异步函数。</p>
<pre><code>Stream&lt;T&gt; handleError(Function onError, {bool test(error)});
Stream&lt;T&gt; timeout(Duration timeLimit,
    {void Function(EventSink&lt;T&gt; sink) onTimeout});
Stream&lt;S&gt; transform&lt;S&gt;(StreamTransformer&lt;T, S&gt; streamTransformer);
</code></pre><p>最后的三个方法更特别。它们用于处理 <strong>await for</strong> 循环不能处理的错误，循环中首次出现的错误会导致循环结束，对 stream 的订阅也被结束。没法从这种情况恢复。可以使用 <code>handleError()</code> 在错误事件到达 <strong>await for</strong> 循环之前从 stream 中移除错误。(原文：You can use handleError() to remove errors from a stream before using it in an await for loop.)</p>
<h2 id="transform-function">transform() function</h2>
<p><code>transform()</code> 函数不仅仅用于错误处理，还能用于对 stream 进行更通用的 “map”。通常的 map 要求为每个收到的事件得到一个值。但是在 I/O 操作中，常常出现几个输入事件生成一个输出事件的情形。<code>StreamTransformer</code> 用于处理这种情况。比如，<code>Utf8Decoder</code> 等解码器也是 transformer。transformer 只需要实现 <code>bind()</code> 方法。</p>
<pre><code>Stream&lt;S&gt; mapLogErrors&lt;S, T&gt;(
  Stream&lt;T&gt; stream,
  S Function(T event) convert,
) async* {
  var streamWithoutErrors = stream.handleError((e) =&gt; log(e));
  await for (var event in streamWithoutErrors) {
    yield convert(event);
  }
}
</code></pre><h2 id="reading-and-decoding-a-file">Reading and decoding a file</h2>
<p>以下代码读文件并且对 stream 运用两个 transform。首先从 UTF8 转换数据，然后再使用 <code>LineSplitter</code>。最后打印所有行，除了以 <code>#</code> 开头的行。</p>
<pre><code>import 'dart:convert';
import 'dart:io';

Future&lt;void&gt; main(List&lt;String&gt; args) async {
  var file = File(args[0]);
  var lines = utf8.decoder
      .bind(file.openRead())
      .transform(LineSplitter());
  await for (var line in lines) {
    if (!line.startsWith('#')) print(line);
  }
}
</code></pre><h1 id="the-listen-method">The listen() method</h1>
<p>最后要介绍的是 Stream 中的 <code>listen()</code> 方法。它是一个低级方法，所有的其他 stream 方法都是某种意义上的 <code>listen()</code> 方法。</p>
<pre><code>StreamSubscription&lt;T&gt; listen(void Function(T event) onData,
    {Function onError, void Function() onDone, bool cancelOnError});
</code></pre><p>要创建新的 <code>Stream</code> 类型，只需要继承 <code>Stream</code> 类并且实现 <code>listen()</code> 方法。<code>Stream</code> 上的其他方法都会调用 <code>listen()</code> 方法。</p>
<p><code>listen()</code> 方法允许监听 stream。直接被监听，否则 stream 就是静态的。开始监听后，将返回 <code>StreamSubscription</code> 对象，它代表活动的、可以产生事件的流。这跟 <code>Iterable</code> 类似，它只是对象集合，itertor 才会真正进行迭代。</p>
<p>stream subscription 允许暂停以及恢复，或者完全取消。还能设置回调，当产生数据事件、错误事件或者 stream 被关闭时都会收到回调。</p>
<h1 id="其他资源">其他资源</h1>
<p>阅读以下 stream 用法及 Dart 异步编程文档，了解更多内容。</p>
<ul>
<li><a href="https://dart.dev/articles/libraries/creating-streams">Creating Streams in Dart</a>, an article about creating your own streams</li>
<li><a href="https://dart.dev/guides/libraries/futures-error-handling">Futures and Error Handling</a>, an article that explains how to handle errors using the Future API</li>
<li><a href="https://dart.dev/guides/language/language-tour#asynchrony-support">Asynchrony support</a>, a section in the <a href="https://dart.dev/guides/language/language-tour">language tour</a></li>
<li><a href="https://api.dart.dev/stable/dart-async/Stream-class.html">Stream API reference</a></li>
</ul>
        </div>

        
<div class="post-archive">
    <ul class="post-copyright">
        <li><strong>原文作者：</strong><a rel="author" href="https://luckly.work/">luckly</a></li>
        <li style="word-break:break-all"><strong>原文链接：</strong><a href="https://luckly.work/post/flutter/Dart%E5%BC%82%E6%AD%A5%E7%BC%96%E7%A8%8B%E4%B9%8BStream/">https://luckly.work/post/flutter/Dart%E5%BC%82%E6%AD%A5%E7%BC%96%E7%A8%8B%E4%B9%8BStream/</a></li>
        <li><strong>版权声明：</strong>本作品采用<a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/">知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议</a>进行许可，非商业转载请注明出处（作者，原文链接），商业转载请联系作者获得授权。</li>
    </ul>
</div>
<br/>



        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/post/Dart%E5%BC%82%E6%AD%A5%E7%BC%96%E7%A8%8B%E4%B9%8BStream/">《Dart异步编程之Stream》</a></li>
        
        <li><a href="/post/flutter/Dart%E5%BE%AE%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95%E7%AC%AC%E4%B8%80%E9%83%A8%E5%88%86/">《Dart微基准测试第一部分》</a></li>
        
        <li><a href="/post/Dart%E5%BE%AE%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95%E7%AC%AC%E4%B8%80%E9%83%A8%E5%88%86/">《Dart微基准测试第一部分》</a></li>
        
        <li><a href="/post/Dart_VM%E7%9A%84%E7%9B%B8%E5%85%B3%E7%AE%80%E4%BB%8B%E4%B8%8E%E8%BF%90%E8%A1%8C%E6%A8%A1%E5%BC%8F%E8%A7%A3%E6%9E%90/">《Dart_VM的相关简介与运行模式解析》</a></li>
        
        <li><a href="/post/flutter/Dart_VM%E7%9A%84%E7%9B%B8%E5%85%B3%E7%AE%80%E4%BB%8B%E4%B8%8E%E8%BF%90%E8%A1%8C%E6%A8%A1%E5%BC%8F%E8%A7%A3%E6%9E%90/">《Dart_VM的相关简介与运行模式解析》</a></li>
        
    </ul>
</div>


        <div class="post-meta meta-tags">
            
            <ul class="clearfix">
                
                <li><a href='/tags/flutter'>flutter</a></li>
                
                <li><a href='/tags/dart'>dart</a></li>
                
            </ul>
            
        </div>
    </article>
    
    

    
    
    <div class="post bg-white">
      <script src="https://utteranc.es/client.js"
            repo= "https://github.com/ITmxs/repo"
            issue-term="pathname"
            theme="github-light"
            crossorigin="anonymous"
            async>
      </script>
    </div>
    
</div>

                    <footer id="footer">
    <div>
        &copy; 2021 <a href="https://luckly.work/">早起的年轻人 By luckly</a>
        
        | <a rel="nofollow" target="_blank" href="http://beian.miit.gov.cn/">粤ICP备2021号-1</a>
        
    </div>
    <br />
    <div>
        <div class="github-badge">
            <a href="https://juejin.cn/user/3843548384077192" target="_black" rel="nofollow"><span class="badge-subject">Powered by</span><span class="badge-value bg-blue">掘金</span></a>
        </div>
        <div class="github-badge">
            <a href="https://space.bilibili.com/480883651" target="_black"><span class="badge-subject">Design by</span><span class="badge-value bg-brightgreen">早起的年轻人</span></a>
        </div>
        <div class="github-badge">
            <a href="https://cloud.tencent.com/developer/user/6702670" target="_black"><span class="badge-subject">Theme</span><span class="badge-value bg-yellowgreen">云社区</span></a>
        </div>
    </div>
</footer>


    
    <script type="text/javascript">
        window.MathJax = {
            tex2jax: {
                inlineMath: [['$', '$']],
                processEscapes: true
                }
            };
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script><script src="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src='/js/totop.js?v=0.0.0' async=""></script>



    <script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




    <script src='/js/douban.js'></script>
    <script src="/js/copy-to-clipboard.js"></script>

                </div>

                <div id="secondary">
    <section class="widget">
        <form id="search" action='https://luckly.work/search/' method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="https://luckly.work/">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E5%8F%98%E6%9B%B4%E7%AE%A1%E7%90%86/" title="变更管理">变更管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E7%9F%A5%E8%AF%86%E7%AE%A1%E7%90%86/" title="知识管理">知识管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E6%96%87%E6%A1%A3%E5%92%8C%E9%85%8D%E7%BD%AE%E7%AE%A1%E7%90%86/" title="文档和配置管理">文档和配置管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E5%90%88%E5%90%8C%E7%AE%A1%E7%90%86/" title="合同管理">合同管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E9%87%87%E8%B4%AD%E7%AE%A1%E7%90%86/" title="采购管理">采购管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E9%A3%8E%E9%99%A9%E7%AE%A1%E7%90%86/" title="风险管理">风险管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E6%B2%9F%E9%80%9A%E7%AE%A1%E7%90%86%E5%92%8C%E5%B9%B2%E7%B3%BB%E4%BA%BA%E7%AE%A1%E7%90%86/" title="沟通管理和干系人管理">沟通管理和干系人管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E4%BA%BA%E5%8A%9B%E8%B5%84%E6%BA%90%E7%AE%A1%E7%90%86/" title="人力资源管理">人力资源管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E8%B4%A8%E9%87%8F%E7%AE%A1%E7%90%86/" title="质量管理">质量管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E8%8C%83%E5%9B%B4%E7%AE%A1%E7%90%86/" title="范围管理">范围管理</a>
    </li>
    
</ul>
    </section>

    
<section class="widget">
    <h3 class="widget-title" style="color:red">福利派送</h3>
    <ul class="widget-list">
        
        <li>
            <a href="https://blog.csdn.net/qq_39132095?spm=1001.2101.3001.5343" title="我的CSDN" target="_blank" style="color:red">
                
                    <img src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/flutter.png">
                
            </a>
        </li>
        
        <li>
            <a href="https://space.bilibili.com/480883651" title="我的哔哩哔哩" target="_blank" style="color:red">
                
                    <img src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/flutter.png">
                
            </a>
        </li>
        
        <li>
            <a href="https://www.zhihu.com/people/yimi-yang-guang-96-65" title="我的知乎" target="_blank" style="color:red">
                
                    <img src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/flutter.png">
                
            </a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title"><a href='/categories/'>分类</a></h3>
<ul class="widget-list">
    
    <li><a href="https://luckly.work/categories/Go/">Go (1)</a></li>
    
    <li><a href="https://luckly.work/categories/Mysql/">Mysql (1)</a></li>
    
    <li><a href="https://luckly.work/categories/Nginx/">Nginx (1)</a></li>
    
    <li><a href="https://luckly.work/categories/YouTube%E8%A7%86%E9%A2%91%E4%B8%8B%E8%BD%BD/">YouTube视频下载 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/android/">android (1)</a></li>
    
    <li><a href="https://luckly.work/categories/dart/">dart (15)</a></li>
    
    <li><a href="https://luckly.work/categories/Flutter/">Flutter (201)</a></li>
    
    <li><a href="https://luckly.work/categories/git/">git (3)</a></li>
    
    <li><a href="https://luckly.work/categories/Go/">Go (4)</a></li>
    
    <li><a href="https://luckly.work/categories/ios/">ios (1)</a></li>
    
    <li><a href="https://luckly.work/categories/linux/">linux (1)</a></li>
    
    <li><a href="https://luckly.work/categories/read/">读书笔记 (6)</a></li>
    
    <li><a href="https://luckly.work/categories/redis/">redis (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B8%AA%E4%BA%BA%E8%B5%84%E6%96%99/">个人资料 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B9%A6%E5%8D%95/">书单 (8)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B9%A6%E8%AF%84/">书评 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统管理师 (8)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统项目管理师 (14)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%8E%9F%E5%88%99/">原则 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%8E%9F%E7%94%9F%E9%80%9A%E8%AE%AF/">原生通讯 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%9F%BA%E7%A1%80/">基础 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%A4%8D%E5%88%A9%E6%95%88%E5%BA%94/">复利效应 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/">安装教程 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%B0%91%E6%9C%89%E4%BA%BA%E8%B5%B0%E7%9A%84%E8%B7%AF/">少有人走的路 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%BF%83%E8%AF%AD/">心语 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E6%8F%92%E4%BB%B6/">插件 (4)</a></li>
    
    <li><a href="https://luckly.work/categories/%E6%95%99%E5%AD%A6/">教学 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%8E%8B%E9%98%B3%E6%98%8E/">王阳明 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%94%B5%E5%AD%90%E4%B9%A6/">电子书 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%99%BB%E9%99%86%E8%A1%A8%E5%8D%95/">登陆表单 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%A8%BB%E7%9B%9B%E5%92%8C%E5%A4%AB/">稻盛和夫 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%A9%B7%E7%88%B8%E7%88%B8%E5%AF%8C%E7%88%B8%E7%88%B8/">穷爸爸富爸爸 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%B2%BE%E8%BF%9B/">精进 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%BC%96%E7%A8%8B/">编程 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B4%A2%E5%8A%A1%E8%87%AA%E7%94%B1%E4%B9%8B%E8%B7%AF/">财务自由之路 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%91%E6%AD%A5/">跑步 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%AF%E7%94%B1%E4%BC%A0%E5%8F%82/">路由传参 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%AF%E7%BA%BF/">路线 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%BD%AF%E4%BB%B6%E5%AE%9E%E6%96%BD/">软件实施 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%98%B3%E6%98%8E%E5%BF%83%E5%AD%A6/">阳明心学 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%A1%B9%E7%9B%AE/">项目 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%AD%85%E5%8A%9B/">魅力 (1)</a></li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title"><a href='/tags/'>标签</a></h3>
<div class="tagcloud">
    
    <a href="https://luckly.work/tags/go/">go</a>
    
    <a href="https://luckly.work/tags/Mysql/">Mysql</a>
    
    <a href="https://luckly.work/tags/Nginx/">Nginx</a>
    
    <a href="https://luckly.work/tags/YouTube%E8%A7%86%E9%A2%91%E4%B8%8B%E8%BD%BD/">YouTube视频下载</a>
    
    <a href="https://luckly.work/tags/android/">android</a>
    
    <a href="https://luckly.work/tags/dart/">dart</a>
    
    <a href="https://luckly.work/tags/flutter/">flutter</a>
    
    <a href="https://luckly.work/tags/git/">git</a>
    
    <a href="https://luckly.work/tags/go/">go</a>
    
    <a href="https://luckly.work/tags/ios/">ios</a>
    
    <a href="https://luckly.work/tags/linux/">linux</a>
    
    <a href="https://luckly.work/tags/redis/">redis</a>
    
    <a href="https://luckly.work/tags/%E4%B8%AA%E4%BA%BA%E8%B5%84%E6%96%99/">个人资料</a>
    
    <a href="https://luckly.work/tags/%E4%B9%A6%E5%8D%95/">书单</a>
    
    <a href="https://luckly.work/tags/%E4%B9%A6%E8%AF%84/">书评</a>
    
    <a href="https://luckly.work/tags/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统管理师</a>
    
    <a href="https://luckly.work/tags/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统项目管理师</a>
    
    <a href="https://luckly.work/tags/%E5%85%A5%E9%97%A8/">入门</a>
    
    <a href="https://luckly.work/tags/%E5%8E%9F%E5%88%99/">原则</a>
    
    <a href="https://luckly.work/tags/%E5%8E%9F%E7%94%9F%E9%80%9A%E8%AE%AF/">原生通讯</a>
    
    <a href="https://luckly.work/tags/%E5%9F%BA%E7%A1%80/">基础</a>
    
    <a href="https://luckly.work/tags/%E5%A4%8D%E5%88%A9%E6%95%88%E5%BA%94/">复利效应</a>
    
    <a href="https://luckly.work/tags/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/">安装教程</a>
    
    <a href="https://luckly.work/tags/%E5%B0%91%E6%9C%89%E4%BA%BA%E8%B5%B0%E7%9A%84%E8%B7%AF/">少有人走的路</a>
    
    <a href="https://luckly.work/tags/%E5%BF%83%E8%AF%AD/">心语</a>
    
    <a href="https://luckly.work/tags/%E6%8F%92%E4%BB%B6/">插件</a>
    
    <a href="https://luckly.work/tags/%E6%95%99%E5%AD%A6/">教学</a>
    
    <a href="https://luckly.work/tags/%E7%8E%8B%E9%98%B3%E6%98%8E/">王阳明</a>
    
    <a href="https://luckly.work/tags/%E7%94%B5%E5%AD%90%E4%B9%A6/">电子书</a>
    
    <a href="https://luckly.work/tags/%E7%99%BB%E9%99%86%E8%A1%A8%E5%8D%95/">登陆表单</a>
    
    <a href="https://luckly.work/tags/%E7%A8%BB%E7%9B%9B%E5%92%8C%E5%A4%AB/">稻盛和夫</a>
    
    <a href="https://luckly.work/tags/%E7%A9%B7%E7%88%B8%E7%88%B8%E5%AF%8C%E7%88%B8%E7%88%B8/">穷爸爸富爸爸</a>
    
    <a href="https://luckly.work/tags/%E7%B2%BE%E8%BF%9B/">精进</a>
    
    <a href="https://luckly.work/tags/%E7%BC%96%E7%A8%8B/">编程</a>
    
    <a href="https://luckly.work/tags/%E8%AF%97/">诗</a>
    
    <a href="https://luckly.work/tags/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/">读书笔记</a>
    
    <a href="https://luckly.work/tags/%E8%B4%A2%E5%8A%A1%E8%87%AA%E7%94%B1%E4%B9%8B%E8%B7%AF/">财务自由之路</a>
    
    <a href="https://luckly.work/tags/%E8%B7%91%E6%AD%A5/">跑步</a>
    
    <a href="https://luckly.work/tags/%E8%B7%AF%E7%94%B1%E4%BC%A0%E5%8F%82/">路由传参</a>
    
    <a href="https://luckly.work/tags/%E8%B7%AF%E7%BA%BF/">路线</a>
    
    <a href="https://luckly.work/tags/%E8%BD%AF%E4%BB%B6%E5%AE%9E%E6%96%BD/">软件实施</a>
    
    <a href="https://luckly.work/tags/%E9%80%9A%E8%AE%AF%E5%BD%95/">通讯录</a>
    
    <a href="https://luckly.work/tags/%E9%98%B3%E6%98%8E%E5%BF%83%E5%AD%A6/">阳明心学</a>
    
    <a href="https://luckly.work/tags/%E9%A1%B9%E7%9B%AE/">项目</a>
    
    <a href="https://luckly.work/tags/%E9%AD%85%E5%8A%9B/">魅力</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="https://www.flysnow.org/" title="飞雪无情的博客">飞雪无情的博客</a>
        </li>
        
        <li>
            <a target="_blank" href="http://yuedu.baidu.com/ebook/14a722970740be1e640e9a3e" title="Android Gradle权威指南">Android Gradle权威指南</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="https://luckly.work/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
            </div>
        </div>
    </div>
</body>

</html>